import "font-awesome/css/font-awesome.min.css"
import "element-plus/theme-chalk/index.css"
import "@/assets/css/index.scss"
import "@/assets/css/custom.scss"
import {library} from '@fortawesome/fontawesome-svg-core'
import {fas} from '@fortawesome/free-solid-svg-icons'
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
import userComponent from"@/components/comp/selfcomp";
import App from "./App";
import {createApp} from "vue"
import ElementPlus from "element-plus"
import 'highlight.js/styles/idea.css' //这里有多个样式，自己可以根据需要切换
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'
import animated from "animate.css"
import ZhLocale from 'element-plus/lib/locale/lang/zh-cn'; // 中文
import router from "./router";
import store from "./store";
import {VueDraggableNext} from "vue-draggable-next";
import $ from "jquery";

library.add(fas);
const app = createApp(App);
app.component("user-icon", FontAwesomeIcon);
app.component("draggable", VueDraggableNext);
for(let key in userComponent){
    app.component(key,userComponent[key]);
}
app.use(router);
app.use(store);
app.use(animated);
app.use(ElementPlus, {
    locale: ZhLocale
});
app.use(hljsVuePlugin);
/**
 * 处理未捕获异常
 * @param err
 * @param instance
 * @param info
 */
app.config.errorHandler = (err, instance, info) => {
    console.log(err);
    console.log(instance);
    console.log(info);
}
/**
 * 处理警告
 * @param err
 * @param instance
 * @param info
 */
// app.config.warnHandler=(msg, instance, trace)=>{
//     console.log(msg);
//     console.log(instance);
//     console.log(trace);
// }
app.mount('#app');

